#ifndef DW_GRAPHICS_OPENGL_QUERY_H
# define DW_GRAPHICS_OPENGL_QUERY_H

#include "graphics/query.h"

namespace dw
{
	namespace graphics
	{
		namespace opengl
		{

			class Query : public IQuery
			{
				
				friend class Renderer;

			// Constructors
			private:

				Query(const Type type);

				virtual ~Query();

			// Methods
			public:

				virtual void begin();

				virtual void end();

				virtual uint32 getResult() const ;

				virtual IQuery::Type getType() const ;

				virtual void dispose();



				GLenum getGLType() const ;

				GLuint getGLId() const { return _glId; }

			// Fields
			private:

				Type _type;

				GLuint _glId;

			};

		} // namespace opengl
	} // namespace graphics
} // namespace dw

#endif // DW_GRAPHICS_OPENGL_QUERY_H
